This Server

The server hosting this website is on a Raspberry Pi 3. Part of speeding up the server is to copy the web folder into a ram drive. Below is a script I run to copy the web folder into a tmpfs file system.
echo Creating ram drive for /var/www
sudo mount -t tmpfs -osize=150m tmpfs /home/pi/chrometemp
cp -p -r -t /home/pi/chrometemp /var/www/*
sudo mount -t tmpfs -osize=150m tmpfs /var/www
sudo cp -p -r -t /var/www /home/pi/chrometemp/*
sudo umount /home/pi/chrometemp
sudo chown -R root:root /var/www

df -m|head -1
df -m|grep www


The Raspberry Pi 3 is a 1.2 gigahertz 64 bit ARM quad core processor with a gigabyte of ram. What makes it so fast is that the ram is on the same chip as the CPU. Using the mount command to create small ram drives to store common files improves performance.


Back